package com.ia2011.project1.domain;

import java.awt.Point;

public class Spot {

	private Point coord;
	private Action action;
	
	public Spot() {
	}
	
	public Spot(Point coord, Action action) {
		this.setCoord(coord);
		this.setAction(action);
	}
	
	public Spot(Spot spot) {
		this.setCoord(new Point(spot.getCoord()));
		this.setAction(new Action(spot.getAction()));
	}

	public void setCoord(Point coord) {
		this.coord = coord;
	}

	public Point getCoord() {
		return coord;
	}

	public void setAction(Action action) {
		this.action = action;
	}

	public Action getAction() {
		return action;
	}
	
	@Override
	public String toString() {
		return "Spot: \n" +
			"- Coordinates ("+coord.x+","+coord.y+")\n" +
			"- Action type:"+action.getType()+"\n" +
			"- Action userId: "+action.getUserId();
	}
	
}
